package hashmap;

import java.util.HashMap;
import java.util.Set;

public class HashMapDemo {
    public static void main(String[] args) {
        HashMap<Student,String> hm = new HashMap<>();
        hm.put(new Student("zhangsan",23),"北京");
        hm.put(new Student("lisi",24),"南京");
        hm.put(new Student("wangwu",23),"上海");

        Set<Student> set = hm.keySet();
        for (Student student : set) {
            System.out.println(student+hm.get(student));
        }
    }
}
